wayland: Protect against invalid keymaps gotten from the compositor
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 25 Aug 2014 13:55:22 +0000 (15:55 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 26 Aug 2014 11:04:08 +0000 (13:04 +0200)
commit8f2d8dfa3b3069c48b1c7cc82700e607d5c84e4e
treeee77c4296d8bd263a79441543e9090d2f672e822
parentab6f771413bb5a69c9be3365f0f899d5d318f73e
wayland: Protect against invalid keymaps gotten from the compositor

If the compositor sends a keymap that fails on "compilation",
xkb_keymap_new_from_string() returns NULL, which makes xkb_state_new()
crash when assuming there is a keymap.

In these cases, gdk must remain with a xkb_state to handle modifiers/keys
properly, so warn about the invalid keymap string, and keep the previous
keymap (currently initialized to "us")

https://bugzilla.gnome.org/show_bug.cgi?id=735389
gdk/wayland/gdkkeys-wayland.c